package org.ehe.business.step.domain.DTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.ehe.common.mybatis.core.domain.BaseEntity2;
import org.ehe.system.domain.vo.SysOssVo;
import org.ehe.system.service.ISysOssService;


import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
 * @author :zhangnn
 * @className :StepAnalysisDTO
 * @description: TODO
 * @date 2025-08-06 13:58:21
 */


/**
 * STEP文件分析结果DTO
 */
@Data
public class StepAnalysisDTO extends BaseEntity2 {
    private Long id;

    @NotBlank(message = "文件名称不能为空")
    private String fileName;

    @NotNull(message = "文件大小不能为空")
    @Min(value = 0, message = "文件大小不能为负数")
    private Long fileSize;

    @NotNull(message = "分析时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime analysisTime;

    private String description;
    private String creationInfo;
    private String unit;
    private String complexity;
    private String requestId;
    private Integer processingTimeMs;

    // 几何实体信息
    private Map<String, Integer> geometricEntities;

    // 几何分析信息
    private List<String> boundingBox;
    private String dimensions;
    private Map<String, Integer> surfaceTypes;
    private Integer surfaceComplexityScore;
    private List<String> machiningFeatures;
    private Map<String, String> featureDetails;
    private double estimatedVolume;
    private String volumeUnit;
    private BigDecimal surfaceArea;
    private String toleranceInfo;

    // 材料信息
    private List<String> materials;
    private String materialType;
    private Map<String, String> materialProperties;

    // 制造估算信息
    private Integer estimatedDays;
    private Integer machiningHours;
    private double estimatedCost;
    private List<String> recommendedProcesses;
    private Map<String, Double> processTimeBreakdown;
    private Map<String, Double> costBreakdown;
    private double estimatedMaterialVolume;
    private double rawMaterialVolume;
    private double materialUtilization;
    private String difficultyLevel;
    private Integer difficultyScore;
    private String riskLevel;
    private String precisionLevel;
    private List<String> specialRequirements;
    private List<String> requiredEquipment;
    private String minMachineSize;

    // 质量评估
    private List<String> qualityIssues;
    private List<String> recommendations;
    private Integer qualityScore;

    // 文件路径
    private String pdfReportPath;
    private String technicalDrawingPath;
    private String modelPreviewPath;

    // 其他信息
    private String cadSoftware;
    private String stepVersion;
    private Map<String, Object> metadata;

    //返回结果的json，前端直接从这个地方进行解析
    private String resultJson;
    private String ossId;
    private SysOssVo ossVo;
}
